using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class UserProfileMap : EntityTypeConfiguration<UserProfile>
    {
        public UserProfileMap()
        {
            // Primary Key
            this.HasKey(t => t.ProfileID);

            // Properties
            this.Property(t => t.PropertyValue)
                .HasMaxLength(3750);

            // Table & Column Mappings
            this.ToTable("UserProfile");
            this.Property(t => t.ProfileID).HasColumnName("ProfileID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.PropertyDefinitionID).HasColumnName("PropertyDefinitionID");
            this.Property(t => t.PropertyValue).HasColumnName("PropertyValue");
            this.Property(t => t.PropertyText).HasColumnName("PropertyText");
            this.Property(t => t.Visibility).HasColumnName("Visibility");
            this.Property(t => t.LastUpdatedDate).HasColumnName("LastUpdatedDate");
        }
    }
}
